package org.colafries.admin.entity.domain.index;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 逻辑维度关系表
*
* @author Ann
* @since 2024-06-14
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "t_idx_logic_dim_relation")
public class LogicDimRelation implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 逻辑维度code
     */
    @TableField("logic_dim_code")
    private Long logicDimensionCode;

    /**
     * 逻辑维度英文名
     */
    @TableField(exist = false)
    private String logicDimField;

    /**
     * 逻辑事实表code
     */
    @TableField("logic_fct_tbl_code")
    private Long logicTableCode;

    /**
     * 逻辑事实表英文名
     */
    @TableField(exist = false)
    private String logicTableName;

    /**
     * 计算表达式
     */
    @TableField("expression")
    private String expression;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 修改人
     */
    @TableField("update_user")
    private String updateUser;

}
